//
//  ViewController.m
//  Timers
//
//  Created by iD Student on 6/28/13.
//  Copyright (c) 2013 iD Student. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    x = 0;
    timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timerUpdate) userInfo:nil repeats:YES];
    time.text = [[NSString alloc] initWithFormat:@"%d", x];
    y = 0;

    
    
    [self performSelector:@selector(timerUpdate) withObject:nil afterDelay:3];
             
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void) timerUpdate: (int)score
{
    x += 1;
    if( x == 60){
        x = 00;
        y += 1;
    }
    time.text = [[NSString alloc] initWithFormat:@"%d", x];
    min.text = [[NSString alloc] initWithFormat:@"%d", y];

}

@end
